package comparators;

import java.util.Comparator;

import model.ClusteredGenericScenarie;

public class ClusteredGenericScenarieComparator implements
		Comparator<ClusteredGenericScenarie> {

	@Override
	public int compare(ClusteredGenericScenarie o1, ClusteredGenericScenarie o2) {

		if (o1.getCluster() > o2.getCluster()) {
			return 1;
		} else if (o1.getCluster() < o2.getCluster()) {
			return -1;
		} else
			return o1.getScenarie().compareTo(o2.getScenarie());
	}

}
